﻿using ServiceStack.DataAnnotations;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EmailClient.Model
{
    public class MailFolder
    {
        [PrimaryKey, AutoIncrement]
        public int Id { get; set; }

        public int StatusId { get; set; }

        [Required]
        [CustomField("CHAR(100)")]
        public string Name { get; set; }
        
        [References(typeof(MailFolder))]
        public int ParentId { get; set; }

        [Required]
        [References(typeof(EmailAccount))]
        public int AccountId { get; set; }

        [Reference]
        public List<Letter> Letters { get; set; }
    }
}
